Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Spam Detection #83

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

phoenixpereira
Copy link
Member

@phoenixpereira phoenixpereira commented Nov 18, 2024

Description

Automatic spam detection that ignores users who are "active" and for suspected spam messages, deletes the message, times out the user, and sends a message to a log channel.

Changes Made

  • Ignore messages from "active" users who have sent 3+ messages in that channel
  • Use Levenshtein distance to compare the message to known spam messages and if it meets the threshold, the message is classified as spam
  • Times out the user who sent the spam message for 1 day and sends a message to a designated log channel with the user's name and profile image, message, and the channel the message was sent to

Related Issues

Fixes #82

Additional Notes

Example log message:

@phoenixpereira phoenixpereira added the enhancement New feature or request label Nov 18, 2024
@phoenixpereira phoenixpereira self-assigned this Nov 18, 2024
src/main.py Outdated Show resolved Hide resolved
src/utils/spam_detection.py Outdated Show resolved Hide resolved
src/utils/spam_detection.py Outdated Show resolved Hide resolved
src/utils/spam_detection.py Outdated Show resolved Hide resolved
@rayokamoto rayokamoto merged commit da027a5 into compsci-adl:main Nov 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Spam Detection
2 participants